/*
* INSANE - Interactive Structural Analysis Environment
*
* Copyright (C) 2003-2005
* Universidade Federal de Minas Gerais
* Escola de Engenharia
* Departamento de Engenharia de Estruturas
* 
* Author's email :    insane@dees.ufmg.br
* Author's website :  http://www.dees.ufmg.br/insane
* 
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
* 
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/
package br.ufmg.dees.insane.prep;

import java.io.Serializable;

public class MapElement implements Serializable {
	
	private static final long serialVersionUID = 1L;
	private int label = 0;
    private MapNode[] connectivite;
    private MapNode[] boundary;
	private char[] type = new char[2];
    
//*****************************************************************************
	
	  public MapElement(int lb, MapNode[] connect, MapNode[] boundar) {
		this.label = lb;
		this.connectivite = (MapNode[])connect.clone();
		this.boundary = (MapNode[])boundar.clone();
    }
	
//*****************************************************************************
	
	public MapElement(MapNode[] boundar) {
		this.boundary = (MapNode[])boundar.clone();
		this.connectivite = this.boundary;
    }
	
//*****************************************************************************
	
	public void setLabel(int lb) {
		this.label = lb;
	}
	
//*****************************************************************************
	
	public int getLabel( ) {
		return label;
	}
	
//*****************************************************************************
	
	public void setConnectivite(MapNode[] connect) {
		connectivite = connect;
	}
	
//*****************************************************************************
	
	public MapNode[] getConnectivite( ) {
		return connectivite;
	}
	
//*****************************************************************************
	
	public void setBoundary(MapNode[] bound) {
		boundary = bound;
	}
	
//*****************************************************************************
	
	public MapNode[] getBoundary( ) {
		return boundary;
	}
	
//*****************************************************************************
	
	public void setType(char a, char b) {
		this.type[0] = a;
		this.type[1] = b;
	}
	
//*****************************************************************************
	
	public char getType(int index) {
		return type[index];
	}
	
//*****************************************************************************
}

